home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Tele / C / Comet2.1.3.sit / Comet / net_utils.asm < prev    next >
MacBinary  |  1989-12-13  |  1.8 KB  |  [TEXT/????]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: net_utils.asm

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert freeCAD assembly (other/freeCADAssembly) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Dec 13 15:46:28 1989, modified Wed Dec 13 15:46:28 1989, creator '????', type ASCII, 1247 bytes "net_utils.asm" , at 0x55f 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[????]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 6e 65 74 5f 75 74 | 69 6c 73 2e 61 73 6d 00 |..net_ut|ils.asm.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 3f 3f 3f | 3f 00 00 00 00 00 00 00 |.TEXT???|?.......|
|00000050| 00 00 00 00 00 04 df 00 | 00 01 7e a1 ac 65 a4 a1 |........|..~..e..|
|00000060| ac 65 a4 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.e......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 db c0 00 00 |........|........|
|00000080| 3b 09 43 6f 70 79 72 69 | 67 68 74 20 43 6f 72 6e |;.Copyri|ght Corn|
|00000090| 65 6c 6c 20 55 6e 69 76 | 65 72 73 69 74 79 20 31 |ell Univ|ersity 1|
|000000a0| 39 38 36 2e 20 20 41 6c | 6c 20 72 69 67 68 74 73 |986. Al|l rights|
|000000b0| 20 61 72 65 20 72 65 73 | 65 72 76 65 64 2e 0d 3b | are res|erved..;|
|000000c0| 0d 3b 09 41 73 20 6f 66 | 20 34 2f 31 30 2f 38 36 |.;.As of| 4/10/86|
|000000d0| 3a 0d 3b 0d 3b 20 20 20 | 31 30 2f 38 2f 38 37 20 |:.;.; |10/8/87 |
|000000e0| 6b 65 76 69 6e 20 72 65 | 70 6c 61 63 65 64 20 6f |kevin re|placed o|
|000000f0| 6c 64 20 63 6b 73 75 6d | 20 6c 6f 6f 70 20 77 69 |ld cksum| loop wi|
|00000100| 74 68 20 61 20 73 6e 61 | 7a 7a 79 20 64 62 72 61 |th a sna|zzy dbra|
|00000110| 20 6c 6f 6f 70 0d 3b 09 | 31 31 2f 38 2f 38 38 20 | loop.;.|11/8/88 |
|00000120| 6b 65 76 69 6e 20 6d 61 | 64 65 20 63 6b 73 75 6d |kevin ma|de cksum|
|00000130| 20 6c 6f 6f 70 20 66 61 | 73 74 65 72 20 62 79 20 | loop fa|ster by |
|00000140| 75 73 69 6e 67 20 33 32 | 20 62 69 74 20 6f 70 73 |using 32| bit ops|
|00000150| 20 74 6f 20 68 6f 6c 64 | 20 63 61 72 72 69 65 73 | to hold| carries|
|00000160| 0d 0d 09 70 75 62 6c 69 | 63 20 5f 76 65 72 73 69 |...publi|c _versi|
|00000170| 6f 6e 0d 09 5f 76 65 72 | 73 69 6f 6e 3a 20 64 63 |on.._ver|sion: dc|
|00000180| 62 2e 77 20 31 2c 31 30 | 0d 0d 3b 20 62 73 77 61 |b.w 1,10|..; bswa|
|00000190| 70 28 69 6e 74 29 20 73 | 77 61 70 73 20 74 68 65 |p(int) s|waps the|
|000001a0| 20 62 79 74 65 73 20 69 | 6e 20 61 6e 20 69 6e 74 | bytes i|n an int|
|000001b0| 0d 0d 09 70 75 62 6c 69 | 63 09 5f 73 77 61 62 0d |...publi|c._swab.|
|000001c0| 09 70 75 62 6c 69 63 09 | 5f 62 73 77 61 70 0d 0d |.public.|_bswap..|
|000001d0| 5f 73 77 61 62 3a 0d 5f | 62 73 77 61 70 3a 0d 09 |_swab:._|bswap:..|
|000001e0| 6d 6f 76 65 2e 62 09 34 | 28 61 37 29 2c 64 30 0d |move.b.4|(a7),d0.|
|000001f0| 09 6d 6f 76 65 2e 62 09 | 35 28 61 37 29 2c 64 31 |.move.b.|5(a7),d1|
|00000200| 0d 09 6c 73 6c 09 09 23 | 38 2c 64 31 0d 09 6f 72 |..lsl..#|8,d1..or|
|00000210| 2e 77 09 64 31 2c 64 30 | 0d 09 72 74 73 0d 0d 3b |.w.d1,d0|..rts..;|
|00000220| 0d 3b 20 5f 63 6b 73 75 | 6d 28 62 75 66 2c 20 6c |.; _cksu|m(buf, l|
|00000230| 65 6e 29 20 70 65 72 66 | 6f 72 6d 73 20 61 6e 20 |en) perf|orms an |
|00000240| 49 6e 74 65 72 6e 65 74 | 20 74 79 70 65 20 63 68 |Internet| type ch|
|00000250| 65 63 6b 73 75 6d 2e 20 | 62 75 66 20 70 6f 69 6e |ecksum. |buf poin|
|00000260| 74 73 20 74 6f 20 77 68 | 65 72 65 0d 3b 20 09 74 |ts to wh|ere.; .t|
|00000270| 68 65 20 63 68 65 63 6b | 73 75 6d 6d 69 6e 67 20 |he check|summing |
|00000280| 73 68 6f 75 6c 64 20 62 | 65 67 69 6e 2c 20 6c 65 |should b|egin, le|
|00000290| 6e 20 69 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |n is the| number |
|000002a0| 6f 66 20 31 36 20 62 69 | 74 20 77 6f 72 64 73 0d |of 16 bi|t words.|
|000002b0| 3b 09 74 6f 20 62 65 20 | 73 75 6d 6d 65 64 2e 20 |;.to be |summed. |
|000002c0| 52 65 74 75 72 6e 73 20 | 74 68 65 20 63 68 65 63 |Returns |the chec|
|000002d0| 6b 73 75 6d 2e 20 54 68 | 69 73 20 69 73 20 74 68 |ksum. Th|is is th|
|000002e0| 65 20 55 6e 69 78 20 63 | 6f 6d 70 61 74 69 62 6c |e Unix c|ompatibl|
|000002f0| 65 0d 3b 20 20 20 76 65 | 72 73 69 6f 6e 0d 3b 0d |e.; ve|rsion.;.|
|00000300| 09 70 75 62 6c 69 63 09 | 5f 63 6b 73 75 6d 0d 0d |.public.|_cksum..|
|00000310| 5f 63 6b 73 75 6d 3a 0d | 09 6d 6f 76 65 2e 6c 09 |_cksum:.|.move.l.|
|00000320| 34 28 61 37 29 2c 61 30 | 09 09 3b 20 61 30 20 2d |4(a7),a0|..; a0 -|
|00000330| 3e 20 62 75 66 66 65 72 | 0d 09 63 6c 72 2e 6c 09 |> buffer|..clr.l.|
|00000340| 64 30 09 09 09 09 3b 20 | 64 30 20 2d 3e 20 69 6e |d0....; |d0 -> in|
|00000350| 69 74 69 61 6c 20 76 61 | 6c 75 65 20 66 6f 72 20 |itial va|lue for |
|00000360| 78 73 75 6d 0d 09 63 6c | 72 2e 6c 09 64 32 09 09 |xsum..cl|r.l.d2..|
|00000370| 09 09 3b 20 64 32 20 3d | 20 30 0d 09 6d 6f 76 65 |..; d2 =| 0..move|
|00000380| 2e 77 09 38 28 61 37 29 | 2c 64 31 09 09 3b 20 64 |.w.8(a7)|,d1..; d|
|00000390| 31 20 2d 3e 20 6c 65 6e | 67 74 68 0d 09 62 72 61 |1 -> len|gth..bra|
|000003a0| 09 09 73 74 61 72 74 09 | 09 09 3b 20 6a 75 6d 70 |..start.|..; jump|
|000003b0| 20 74 6f 20 64 62 72 61 | 20 74 6f 20 73 74 61 72 | to dbra| to star|
|000003c0| 74 20 6c 6f 6f 70 0d 0d | 6c 70 63 68 6b 3a 0d 09 |t loop..|lpchk:..|
|000003d0| 6d 6f 76 65 2e 77 09 28 | 61 30 29 2b 2c 64 32 09 |move.w.(|a0)+,d2.|
|000003e0| 09 64 32 20 2d 3e 20 6e | 65 78 74 20 77 6f 72 64 |.d2 -> n|ext word|
|000003f0| 0d 09 61 64 64 2e 6c 09 | 64 32 2c 64 30 09 09 09 |..add.l.|d2,d0...|
|00000400| 64 30 20 2b 3d 20 64 32 | 0d 73 74 61 72 74 3a 0d |d0 += d2|.start:.|
|00000410| 09 64 62 72 61 09 64 31 | 2c 6c 70 63 68 6b 09 09 |.dbra.d1|,lpchk..|
|00000420| 3b 6c 6f 6f 70 20 61 72 | 6f 75 6e 64 0d 0d 6c 70 |;loop ar|ound..lp|
|00000430| 64 6f 6e 65 3a 0d 09 73 | 77 61 70 09 64 30 09 09 |done:..s|wap.d0..|
|00000440| 09 09 3b 20 73 77 69 74 | 63 68 20 73 6f 20 63 61 |..; swit|ch so ca|
|00000450| 72 72 69 65 73 20 6f 6e | 20 62 6f 74 74 6f 6d 0d |rries on| bottom.|
|00000460| 09 6d 6f 76 65 2e 77 09 | 64 30 2c 64 31 0d 09 73 |.move.w.|d0,d1..s|
|00000470| 77 61 70 09 64 30 0d 09 | 61 64 64 2e 77 09 64 31 |wap.d0..|add.w.d1|
|00000480| 2c 64 30 09 09 09 3b 20 | 61 64 64 20 63 61 72 72 |,d0...; |add carr|
|00000490| 69 65 73 20 62 61 63 6b | 20 69 6e 0d 09 62 63 63 |ies back| in..bcc|
|000004a0| 2e 73 09 6e 6f 5f 63 61 | 72 72 79 0d 09 61 64 64 |.s.no_ca|rry..add|
|000004b0| 71 2e 77 09 23 31 2c 64 | 30 09 09 09 3b 20 79 65 |q.w.#1,d|0...; ye|
|000004c0| 74 20 61 6e 6f 74 68 65 | 72 20 63 61 72 72 79 20 |t anothe|r carry |
|000004d0| 6f 63 63 75 72 72 65 64 | 0d 0d 6e 6f 5f 63 61 72 |occurred|..no_car|
|000004e0| 72 79 3a 0d 0d 09 72 74 | 73 09 09 09 09 09 09 3b |ry:...rt|s......;|
|000004f0| 20 61 6c 6c 20 64 6f 6e | 65 0d 0d 0d 0d 0d 3b 20 | all don|e.....; |
|00000500| 62 79 74 65 20 73 77 61 | 70 20 61 20 6c 6f 6e 67 |byte swa|p a long|
|00000510| 0d 0d 09 70 75 62 6c 69 | 63 09 5f 6c 73 77 61 70 |...publi|c._lswap|
|00000520| 0d 09 70 75 62 6c 69 63 | 09 5f 77 73 77 61 70 0d |..public|._wswap.|
|00000530| 5f 6c 73 77 61 70 3a 0d | 5f 77 73 77 61 70 3a 0d |_lswap:.|_wswap:.|
|00000540| 09 6d 6f 76 65 2e 6c 09 | 34 28 61 37 29 2c 64 30 |.move.l.|4(a7),d0|
|00000550| 0d 09 73 77 61 70 09 64 | 30 0d 09 72 74 73 0d 00 |..swap.d|0..rts..|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000590| 70 65 72 66 6f 72 6d 73 | 20 61 6e 20 49 6e 74 65 |performs| an Inte|
|000005a0| 72 6e 65 74 20 74 79 70 | 65 20 63 68 65 63 6b 73 |rnet typ|e checks|
|000005b0| 0d 6e 65 74 5f 75 74 69 | 6c 73 2e 61 73 6d 02 00 |.net_uti|ls.asm..|
|000005c0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000005d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 a9 8d 3a 70 00 00 | 00 00 00 00 01 7e 20 31 |....:p..|.....~ 1|
|00000600| 36 20 62 69 74 20 77 6f | 72 64 73 0d 3b 09 74 6f |6 bit wo|rds.;.to|
|00000610| 20 62 65 20 73 75 6d 6d | 65 64 2e 20 52 65 74 75 | be summ|ed. Retu|
|00000620| 72 6e 73 20 74 68 65 20 | 63 68 65 63 6b 73 75 6d |rns the |checksum|
|00000630| 2e 20 54 68 69 73 20 69 | 73 20 74 68 65 20 55 6e |. This i|s the Un|
|00000640| 69 78 20 63 6f 6d 70 61 | 74 69 62 6c 65 0d 3b 20 |ix compa|tible.; |
|00000650| 20 20 76 65 72 73 69 6f | 6e 0d 3b 0d 09 70 75 62 | versio|n.;..pub|
|00000660| 6c 69 63 09 5f 63 6b 73 | 75 6d 0d 0d 5f 63 6b 73 |lic._cks|um.._cks|
|00000670| 75 6d 3a 0d 09 6d 6f 76 | 65 2e 6c 09 34 28 61 37 |um:..mov|e.l.4(a7|
|00000680| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 14 |...H..Mo|naco....|
|00000690| 00 01 02 44 00 0a 00 45 | 00 81 00 50 00 82 00 82 |...D...E|...P....|
|000006a0| 82 00 00 14 00 01 00 06 | 00 04 00 27 00 00 01 e1 |........|...'....|
|000006b0| 02 00 00 27 00 00 01 e1 | 02 00 a1 ac 1f 54 00 00 |...'....|.....T..|
|000006c0| 00 52 00 00 00 52 00 00 | 03 4f 01 00 00 00 01 00 |.R...R..|.O......|
|000006d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 1a 84 5c |...L...L|...2...\|
|000006e0| 09 ec 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000006f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 1b bb 6c 00 00 |........|.....l..|
+--------+-------------------------+-------------------------+--------+--------+